package com.wentao.thisFacade.common.exception;

import com.wentao.thisFacade.common.enums.ExceptionCode;

/**
 * @Auther: ZhaiYanTao
 * @Date: 2020/3/27 11:05
 * @Description: 自定义异常
 */
public class CustomException extends RuntimeException {

    private String code;
    private String message;

    public CustomException(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public CustomException(ExceptionCode exceptionCode) {
        this.code = exceptionCode.getCode();
        this.message = exceptionCode.getMessage();
    }

}
